package com.pulaien.shop.controller;

import com.pulaien.common.annotation.Log;
import com.pulaien.common.core.controller.BaseController;
import com.pulaien.common.core.domain.AjaxResult;
import com.pulaien.system.domain.dto.NoticeUserDto;
import com.pulaien.system.service.INoticeUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 公告用户关联Controller
 *
 * @author pulaien
 */
@RestController
@RequestMapping("/shop/notice/user")
@Api(tags = "NoticeUserController", description = "公告用户关联")
public class NoticeUserController extends BaseController
{
    @Autowired
    private INoticeUserService noticeUserService;

    /**
     * 修改公告用户关联
     */
    @ApiOperation(value = "获取用户公告")
    @GetMapping("/getUserNotice")
    public AjaxResult getUserNotice()
    {
        return noticeUserService.getUserNotice();
    }




    /**
     * 关掉弹窗公告
     */
    @ApiOperation(value = "关掉弹窗公告")
    @Log(title = "关掉弹窗公告")
    @PostMapping("/updatePopupStatus")
    public AjaxResult updatePopupStatus(@RequestBody NoticeUserDto noticeUser)
    {
        return this.noticeUserService.updatePopupStatus(noticeUser);
    }


}
